<template>
  <a-drawer
    width="35%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32" style="width: 50%; left: 25%">
          <a-col :span="24">
            <a-form-model-item label="检查时间" prop="dateRange">
              <a-range-picker
                v-model="form.dateRange"
                allowClear
                valueFormat="YYYY-MM-DD"
                format="YYYY-MM-DD"
                style="width: 100%"
              ></a-range-picker>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="文号" prop="tz00602">
              <a-input
                v-model="form.tz00602"
                placeholder="请输入文号"
                allowClear
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="24">
            <a-form-model-item label="存在的问题" prop="tz00603">
              <a-textarea
                v-model="form.tz00603"
                placeholder="请输入存在的问题"
                :rows="4"
                allowClear
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="24">
            <a-form-model-item label="整改措施" prop="tz00604">
              <a-textarea
                v-model="form.tz00604"
                placeholder="请输入整改措施"
                :rows="4"
                allowClear
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="24">
            <a-form-model-item label="责任单位" prop="deptList">
              <a-tree-select
                style="width: 100%"
                v-model="deptList"
                :replaceFields="replaceFields"
                placeholder="请选择责任单位"
                allow-clear
                multiple
                tree-default-expand-all
                :tree-data="deptOptions"
              >
              </a-tree-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="状态" prop="tz00605">
              <a-select
                v-model="form.tz00605"
                @change="handleChange"
                allowClear
                default-value="整改中"
              >
                <a-select-option value="整改中">整改中</a-select-option>
                <a-select-option value="已整改">已整改</a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button @click="cancel"> 取消 </a-button>
          <a-button type="primary" @click="submitForm"> 保存 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizTaizhang006EditForm from "./BizTaizhang006Form";
export default {
  ...BizTaizhang006EditForm,
};
</script>
